{extend name="public/base"/}
{block name="style"}
<link rel="stylesheet" href="/public/lboyue/m/css/swiper-4.2.0.min.css?v=20180509">
<script type="text/javascript" src="/public/lboyue/m/sitejs/book.js?v=20180509"></script>
{/block}
{block name="body"}
<body class="app_NoMoblie">
<div class="app_goBackToTop"></div>

<div class="app_position"></div>

<div class="app_header_section">
    <div class="app_header_section_top">
        <a class="app_logoLink2" href="/"><img src="/public/novel/images/logo.png" alt="" width="120"/></a>
                <div class="app_header_section_nav">
            <ul class='app_marginLeft app_styleUl2' >
            <li {if $channel==1}class="active"{/if}>
                <a href="/?channel=1">男频</a>
            </li>
			<li {if $channel==2}class="active"{/if} >
                <a href="/?channel=2">女频</a>
            </li>
			</ul>
        </div>
        
        <div class="app_header_section_rightButtons">
            <ul>
                <li class="book">
                    <a href="/personal/bookcase"></a>
                </li>
                <li class="my">
                    <a href="/personal/info"></a>
                </li>
            </ul>
        </div>

    </div>
</div>

<div class="app_body">

    <div class="app_searchBlock  app_deleteMargin">
        <div class="app_searchBlock_bar">
            <input type="text" value="" placeholder="神医" id="searchkeyword1">
            <button class="button" onclick="skipsearchbook(1)"></button>
        </div>
    </div>

    <!-- 首页轮播图 -->
    <div class="app_body_banner swiper-container">
        <div class="swiper-wrapper">
			{volist name="ad" id="vo"}
            <div class="swiper-slide">
                    <a href="{$vo.url}">
                        <img src="{$vo.cover_id}"/>
                    </a>
            </div>
			{/volist}
		</div>
        <div class="swiper-pagination"></div>
    </div>

    <div class="app_icRanking">
        <ul>
            <li><a href="/personal/bookcase" class="nav1">读过</a></li>
			<li><a href="/top/channel/{$channel}/type/1/" class="nav2">排行</a></li>
			<li><a href="/fullflag/channel/{$channel}/type/1/" class="nav3">完本</a></li>
			<!--如果有频道分类，而且在index标识的频道-->
			<li><a href="/books" class="nav4">书库</a></li>
            <li><a href="/pay/index" class="nav5">充值</a></li>
        </ul>
    </div>


    <!-- 最近阅读 -->
    <div class="app_noticeSection" id="lastreadlog" style="display: none"></div>

    <!-- 火爆热书 -->
        <div class="app_listBlock">

        <div class="app_listBlock_title  tit_icon1">
            <span class="h1">火爆热书</span>
            <!--<a  class="more" href="">更多</a>-->
        </div>

        <div class="app_listBlock_con">
            <ul>
			{volist name="hottop" id="vo"}
				{if $key <2}
                <li>
                        <a href="{:url('/book/info',array("id"=>$vo.id))}">
                            <div class="leftImage"><img src="{$vo.cover}" onerror="javascript:this.src='/public/novel/images/default.jpg';"/></div>
                            <div class="rightBlock">
                                <span class="rightBlock_title">{$vo.title}</span>
                                <span class="rightBlock_con">
                                     <span class="con">{$vo.intro}</span>
                                </span>
                                <span class="rightBlock_label">
                                <span class="keyWord_l">
                                       <i class="k1">{$vo['fullflag']==1?"完结":"连载中"}</i>
                                </span>
                                <span class="keyWord_r">
                                       <i class="k1">{$vo['size']/10000|round=###,1}万字</i>
                                       <i class="k2">{$vo.category_id| get_category=###,'title'}</i>
                                </span>
                            </span>
                            </div>
                        </a>
                    </li>
				{/if}
				{/volist}	
				</ul>
        </div>
    </div>
    
    <!-- 单本推荐 -->
    <div class="app_recommendBlock">
		{list name="novel" id="item" limit="1" map=" status=1 and display=1 and FIND_IN_SET(14,is_top)"}
        <a href="{:url('/book/info',array("id"=>$item.id))}">
            <span class="img"><img src="{$item.coverl}" alt="" onerror="javascript:this.src='/public/novel/images/default.jpg';"/></span>
            <div class="title">
                <span class="tips">推荐</span>
                <span class="content">{$item.intro}…</span>
            </div>
        </a>
		{/list}
    </div>
    
    <!-- 潜力新书 -->
        <div class="app_listBlock">
        <div class="app_listBlock_title  tit_icon1">
            <span class="h1">潜力新书</span>
        </div>
        <div class="app_listBlock_con2">
            <ul>
				{volist name="hottop" id="vo"}

				{if $key <3}
					<li>
                        <a href="{:url('/book/info',array("id"=>$vo.id))}">
                            <span class="img"><img src="{$vo.cover}" onerror="javascript:this.src='/public/novel/images/default.jpg';" /></span>
                            <span class="name">{$vo.title}</span>
                        </a>
                    </li>
				{/if}
				{/volist}		
				</ul>
        </div>
    </div>
    
    <!-- 热门标签 -->
    
    <!-- 热门/精品/完本 -->

    <div class="app_listBlock">
        <div class="app_tabSection">
            <div class="app_tabSection_border2">
                <ul>
                    <li class="active"><i>热门</i></li>
                    <li><i>精品</i></li>
                    <li><i>完本</i></li>
                </ul>
            </div>
        </div>
        <div class="app_selectBlock">

            <div class="app_list">
                <div class="app_listBlock_con">
                    <ul class="app_deletePaddingBottom">
						{list name="novel" id="item" limit="0,1" map=" status=1 and display=1" order="allvisit DESC"}
                        <li>
                            <a href="{:url('/book/info',array("id"=>$item.id))}">
                                <div class="leftImage"><img src="{$item.cover}" alt="" onerror="javascript:this.src='/public/novel/images/default.jpg';"/></div>
                                <div class="rightBlock">
                                    <span class="rightBlock_title">{$item.title}</span>
                                    <span class="rightBlock_con">
                                     <span class="con">　　{$item.intro}</span>
                            </span>
                                    <span class="rightBlock_label">
                                <span class="keyWord_l">
                                       <i class="k1">{$item['fullflag']==1?"完结":"连载中"}</i>
                                </span>
                                <span class="keyWord_r">
                                       <i class="k1">{$item.size/10000|round=###,1}万字</i>
                                       <i class="k2">{$item.category_id| get_category=###,'title'}</i>
                                </span>
                            </span>
                                </div>
                            </a>
                        </li>
					{/list}
                    </ul>
                </div>

                <div class="app_listArticle">
                    <ul>
						{list name="novel" id="item" limit="1,4" map=" status=1 and display=1" order="allvisit DESC"}
                        <li>
                                <a href="{:url('/book/info',array("id"=>$item.id))}">
                                    <i>[{$item.category_id| get_category=###,'title'}]</i>{$item.title}<span>
                                    <em class=""></em>
                                    </span>
                                </a>
                        </li>
						{/list}
					</ul>
                </div>

            </div>

            <div class="app_list" style="display: none;">

                <div class="app_listBlock_con">
                    <ul class="app_deletePaddingBottom">
					{list name="novel" id="item" limit="0,1" map=" status=1 and display=1 and FIND_IN_SET(3,is_top)"}
                        <li>
                            <a href="{:url('/book/info',array("id"=>$item.id))}">
                                <div class="leftImage"><img src="{$item.cover}" alt="" onerror="javascript:this.src='/public/novel/images/default.jpg';"/></div>
                                <div class="rightBlock">
                                    <span class="rightBlock_title">{$item.title}</span>
                                    <span class="rightBlock_con">
                                     <span class="con">　　{$item.intro}</span>
                            </span>
                                    <span class="rightBlock_label">
                                <span class="keyWord_l">
                                       <i class="k1">{$item['fullflag']==1?"完结":"连载中"}</i>
                                </span>
                                <span class="keyWord_r">
                                       <i class="k1">{$item.size/10000|round=###,1}万字</i>
                                       <i class="k2">{$item.category_id| get_category=###,'title'}</i>
                                </span>
                            </span>
                                </div>
                            </a>
                        </li>
					{/list}
                    </ul>
                </div>

                <div class="app_listArticle">
                    <ul>
					{list name="novel" id="item" limit="1,4" map=" status=1 and display=1 and FIND_IN_SET(3,is_top)"}
                        <li>
                                <a href="{:url('/book/info',array("id"=>$item.id))}">
                                    <i>[{$item.category_id| get_category=###,'title'}]</i>{$item.title}<span>
                                    <em class=""></em>
                                    </span>
                                </a>
                        </li>
					{/list}
					</ul>
                </div>

            </div>

            <div class="app_list" style="display: none;">

                <div class="app_listBlock_con">
                    <ul class="app_deletePaddingBottom">
                        {list name="novel" id="item" limit="0,1" map=" status=1 and display=1 and fullflag=1" order="allvisit DESC"}
                        <li>
                            <a href="{:url('/book/info',array("id"=>$item.id))}">
                                <div class="leftImage"><img src="{$item.cover}" alt="" onerror="javascript:this.src='/public/novel/images/default.jpg';"/></div>
                                <div class="rightBlock">
                                    <span class="rightBlock_title">{$item.title}</span>
                                    <span class="rightBlock_con">
                                     <span class="con">　　{$item.intro}</span>
                            </span>
                                    <span class="rightBlock_label">
                                <span class="keyWord_l">
                                       <i class="k1">{$item['fullflag']==1?"完结":"连载中"}</i>
                                </span>
                                <span class="keyWord_r">
                                       <i class="k1">{$item.size/10000|round=###,1}万字</i>
                                       <i class="k2">{$item.category_id| get_category=###,'title'}</i>
                                </span>
                            </span>
                                </div>
                            </a>
                        </li>
					{/list}
                    </ul>
                </div>

                <div class="app_listArticle">
                    <ul>
					{list name="novel" id="item" limit="1,4" map=" status=1 and display=1 and fullflag=1" order="allvisit DESC"}
                        <li>
                                <a href="{:url('/book/info',array("id"=>$item.id))}">
                                    <i>[{$item.category_id| get_category=###,'title'}]</i>{$item.title}<span>
                                    <em class=""></em>
                                    </span>
                                </a>
                        </li>
					{/list}
					</ul>
                </div>

            </div>

        </div>
    </div>

    <!-- 编辑推荐 -->
    

    <!-- 编辑推荐 -->
        <div class="app_listBlock">
        <div class="app_listBlock_title  tit_icon1">
            <span class="h1">编辑推荐</span>
        </div>
        <div class="app_newRankingList">
            <ul>
				{volist name="editortop" id="vo"}
                <li>
                        <a href="{:url('/book/info',array("id"=>$vo.id))}">
                            <span class="number red ">{$key+1}</span>
                            <i>[短篇]</i>{$vo.title}              <span><em
                                    class="{if $key==0}hot{/if}{if $key>0&&$vo['fullflag']==1}wan{/if}"></em></span>
                        </a>
                    </li>
				{/volist}	
				</ul>
        </div>
    </div>
    
    <!-- app -->
	{block name="include"}{include file="public:footer" /}{/block}
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(document).ready(function () {

        //轮播图
        var mySwiper = new Swiper('.swiper-container', {
            autoplay: true,//可选选项，自动滑动,
            loop: true,
            pagination: {
                el: '.swiper-pagination',
            },
            on: {
                slideChangeTransitionEnd: function () {
                    this.autoplay.start()
                },
            },
        })


        //tab切换
        $('.app_tabSection').on('click', 'li', function () {

            $(this).parent().find('li').removeClass('active');
            $(this).addClass('active');

            var activeIndex = $(this).index();

            $(this).parent().parent().parent().next().find('.app_list').hide();
            $(this).parent().parent().parent().next().find('.app_list').eq(activeIndex).show();

        })
    })

    $.ajax({
        url: "/api/history/getlastreadlog",
        type: "GET",
        dataType: "json",
        data: {},
        success: function (re) {
            var code = re.code;
            switch (code) {
                case 1:
                    $("#lastreadlog").html(re.data);
                    $("#lastreadlog").show();
                    break;
                default:
                    break;
            }
        },
        error: function () {
            return "";
        }
    });

    // 设置首页小方框中字体居中
    var u = navigator.userAgent;
    if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
        $('.app_listBlock_con ul li .rightBlock .keyWord_l .k1').css({'padding-top': '0.08rem'});
        $('.app_listBlock_con ul li .rightBlock .keyWord_l .k2').css({'padding-top': '0.07rem'});
        $('.app_listBlock_con ul li .rightBlock .keyWord_r .k1').css({'padding-top': '0.07rem'});
        $('.app_listBlock_con ul li .rightBlock .keyWord_r .k2').css({'padding-top': '0.07rem'});
    }
</script>
{/block}


